package Custom;

import java.awt.Color;
import java.awt.Font;
import javax.swing.JButton;


////////// THE CUSTOM BUTTON \\\\\\\\\\
public class Button extends JButton {
	
	private static final long serialVersionUID = 1L;
	private Font textFont = new Font("Serif",Font.BOLD,12);
	private Color buttonColor = new Color(105, 105, 105);
	
	///// DECLARE FIELDS \\\\\
	
	private String t;
	private Button a;


	///// CONSTRUCTOR \\\\\
	public Button(String t) {
		
		///// STES THE FONT OF THE BUTTON AND SETS THE COLOR \\\\\
		setOpaque(true);
		setFont(textFont);
		setText(t);
		setForeground(Color.white);
		setBackground(buttonColor);
		
		///// THIS MAKES SURE YOU CAN GIVE A IMAGE AS PARAMETER WHEN YOU DECLARE A BUTTON \\\\\
//		Icon i = new ImageIcon(getClass().getResource(url));
//		setIcon(i);
		
		///// MAKES SURE THE BUTTON LOOKS VERY NICE AND CENTERS THE TEXT OF THE BUTTON \\\\\
		setBorderPainted(false); 
		setHorizontalTextPosition(CENTER);
		setVerticalTextPosition(CENTER);
	}
	
	public Button() {
		setOpaque(true);
		
		setBorderPainted(false);
		
	}

	///// GETTERS AND SETTERS \\\\\
	
	public String getT() {
		return t;
	}

	public void setT(String t) {
		this.t = t;
	}

	public Button getA() {
		return a;
	}

	public void setA(Button a) {
		this.a = a;
	}
	
	
}
